from http.cookiejar import join_header_words

a= 'askdjfascxaisdwsdf'
#获取某个字符的位置
print(a.index('sk'))
print(a.find('dj'))
#字符串大小写转换
print(a.upper()) #转换为大写
print(a.lower()) #转换为小写
print(a.swapcase())#大小写转换
print(a.capitalize())#首字母大写，其余小写
a1= "how are you"
print(a1.title())#每个单词的首字母大写
#字符串对齐
print(len(a))
a2=a.center(29,'*')
print(a2)
print(a.ljust(30,'*'))
print(a.zfill(30))
#分割字符串
print(a.split())#默认空格分割
#合并和替换
c = "-".join(["ab","b","c","d"])
print(c)
#比较
a32=('1','英','A','a')
print(max(a32))
#